//
//  UIImage+Resize.h
//  hehenianMobileFramework
//
//  Created by huhmf on 15/7/13.
//  Copyright (c) 2015年 huihu. All rights reserved.

#import <UIKit/UIKit.h>

@interface UIImage (Resize)

- (UIImage *)resizedImageWithRestrictSize:(CGSize)size;

- (UIImage *)resizedImageWithTargetRestrictSize:(CGSize)dstSize;

- (UIImage *)resizedImage:(CGSize)newSize
     interpolationQuality:(CGInterpolationQuality)quality;

- (UIImage *)resizedImage:(CGSize)newSize
                transform:(CGAffineTransform)transform
           drawTransposed:(BOOL)transpose
     interpolationQuality:(CGInterpolationQuality)quality;

/**
 *  压缩图片
 *
 *  @param image       原始图片
 *  @param maxFileSize 图片大小的最大值
 *
 *  @return 压缩后的图片
 */
+ (NSData *)compressImage:(UIImage *)image toMaxFileSize:(NSInteger)maxFileSize;
@end
